<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>达达奶茶店首页</title>
    <link rel="stylesheet" href="../css/DaDaMain.css">
    <script src="../js/jquery-3.7.1.min.js"></script>
</head>
<body>
    <div class="nav-body">
       
        <div class="head">
            <div class="logo">
                <a href="#" id="logo">
                    <p>达达奶茶店</p>
                </a>
            </div>
        <div class="first-button">
          
           <ul>
            <li> <img src="../image/naicha_1.png"><a>首页</a></li>
            <li> <img src="../image/naicha_1.png"><a href="Order.html">喝奶茶</a></li>
            <li> <img src="../image/shoucangjia.png"><a href="Favorites.html">收藏夹</a></li>
            <li> <img src="../image/naicha_1.png"><a href="Personal.html">个人中心</a></li>
            <li> <img src="../image/naicha_1.png"><a>本店介绍</a></li>
           </ul>
        
        </div>
        </div>

        <div class="body">
            <div class="xvanchuantu">
                <img class="one" src="../image/奶茶图1.gif">
                <img class="two" src="../image/奶茶2.gif">
                <img class="three" src="../image/naicha-2.png">
            </div>
        </div>
        <div class="bihebang" id="container">
            <div class="biaoti">
                <span>必喝榜</span>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                <span><img src="../image/dingwei.png" class="dingwei">珠海斗门大信店</span>
            </div>

        </div>
    </div>
    <script>
      $(function(){
          $.ajax({
              url: '../getTeainfoList',
              method: 'get',
              success: function (result){
                  //渲染页面
                  $.each(result, function(index, obj){
                      $('#container').append(
                          '<div class="liebiao">' +
                              `<a href="Goods.html">` +
                                  `<img src="../image/${obj.teaImg}" class="niuyouguo"></a>` +
                              `<p>${obj.teaName}<a href=""><img src="../image/shoucangjia.png" class="scj"></a></p>` +
                              `<p class="price">${obj.teaPrice}</p>` +

                          `</div>`
                      );
                  })
              }
          });
      })
    </script>
</body>
</html>